/*
 * Copyright (c) 2006-2020, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2020-05-21     chenhy       the first version
 */
#ifndef APPLICATIONS_UART_H_
#define APPLICATIONS_UART_H_
#include <stdint.h>
#include <stm32f0xx.h>
#define UART_CACHE_SIZE 1024
extern UART_HandleTypeDef huart1;
extern UART_HandleTypeDef huart2;
extern UART_HandleTypeDef huart3;
int uart1_init(void);
int uart2_init(void);
int uart3_init(void);
void uart_recv_callback(UART_HandleTypeDef *huart, uint8_t* pbuf, int32_t size);
int32_t uart_write(UART_HandleTypeDef *huart, void* pbuf, int32_t size);
void print_buffer(uint8_t *data, int32_t length);
#endif /* APPLICATIONS_UART_H_ */
